<%@ page language="java" import="java.util.*" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@include file="/context/mytags.jsp"%>
<!DOCTYPE html>
<html>
 <head>
  <title>仓库管理</title>
  <t:base type="jquery,easyui,tools,DatePicker"></t:base>
  <script type="text/javascript">
  function openDepartmentSelect() {
		$.dialog.setting.zIndex = getzIndex(); 
		var orgIds = $("#orgId").val();

		$.dialog({
		    content: 'url:departController.do?departSelect&orgIds=' + orgIds,
		    zIndex: getzIndex(),
		    title: '部门列表',
		    lock: true,
		    width: '400px',
		    height: '350px',
		    opacity: 0.4,
		    button: [{
		        name: '<t:mutiLang langKey="common.confirm"/>',
		        callback: callbackDepartmentSelect,
		        focus: true
		    },
		    {
		        name: '<t:mutiLang langKey="common.cancel"/>',
		        callback: function() {}
		    }]
		}).zindex();
	
	}
	function callbackDepartmentSelect() {
		  var iframe = this.iframe.contentWindow;
		  var treeObj = iframe.$.fn.zTree.getZTreeObj("departSelect");
		  var nodes = treeObj.getCheckedNodes(true);
		  if(nodes.length>0){
		  var ids='',names='';
		  for(i=0;i<nodes.length;i++){
		     var node = nodes[i];
		     ids += node.id+',';
		    names += node.name+',';
		 }
		 $('#orgName').val(names);
		 $('#orgName').blur();		
		 $('#orgId').val(ids);		
		}
	}
  </script>
 </head>
 <body>
		<t:formvalid formid="formobj" dialog="true" usePlugin="password" layout="table" action="wzDepotController.do?doUpdate" >
					<input id="id" name="id" type="hidden" value="${wzDepotPage.id }"/>
		<table style="width: 600px;" cellpadding="0" cellspacing="1" class="formtable">
					<tr>
						<td align="right">
							<label class="Validform_label">
								仓库名称:
							</label>
						</td>
						<td class="value">
						    <input id="name" name="name" type="text" maxlength="50" style="width: 150px" class="inputxt"  ignore="checked"  value='${wzDepotPage.name}'/>
							<span class="Validform_checktip"></span>
							<label class="Validform_label" style="display: none;">仓库名称</label>
						</td>
					</tr>
					
					<tr>
						<td align="right">
							<label class="Validform_label">
								所属部门:
							</label>
						</td>
						<td class="value">
					<input id="orgName" name="orgName" type="text" readonly="readonly" value="${orgName }" class="inputxt" datatype="*"/>
                <input id="orgId" name="orgId" type="hidden" value="${wzDepotPage.orgId }"/>
							<a href="#" class="easyui-linkbutton" plain="true" icon="icon-search" id="departSearch" onclick="openDepartmentSelect()">选择</a>
                <a href="#" class="easyui-linkbutton" plain="true" icon="icon-redo" id="departRedo" onclick="callbackClean()">清空</a>
                <span class="Validform_checktip"><t:mutiLang langKey="please.muti.department"/></span>
						</td>
					</tr>
					<tr>
						<td align="right">
							<label class="Validform_label">
								仓库地址:
							</label>
						</td>
						<td class="value">
						    <input id="addr" name="addr" type="text" maxlength="50" style="width: 150px" class="inputxt"  ignore="ignore"  value='${wzDepotPage.addr}'/>
							<span class="Validform_checktip"></span>
							<label class="Validform_label" style="display: none;">仓库地址</label>
						</td>
					</tr>
					<tr>
						<td align="right">
							<label class="Validform_label">
								仓管员:
							</label>
						</td>
						<td class="value">
							<t:userSelect selectedIdsInputId="managerId" selectedNamesInputId="managerName" windowWidth="800px" userIdsDefalutVal=" value='${wzDepotPage.managerId}'" userNamesDefalutVal="${managerName}"></t:userSelect>
							<span class="Validform_checktip"></span>
							<label class="Validform_label" style="display: none;">仓管员</label>
						</td>
					</tr>
					<tr>
						<td align="right">
							<label class="Validform_label">
								备注:
							</label>
						</td>
						<td class="value">
						    <input id="descs" name="descs" type="text" maxlength="4000" style="width: 150px" class="inputxt"  ignore="ignore"  value='${wzDepotPage.descs}'/>
							<span class="Validform_checktip"></span>
							<label class="Validform_label" style="display: none;">备注</label>
						</td>
					</tr>
					<tr>
						<td align="right">
							<label class="Validform_label">
								物业名称:
							</label>
						</td>
						<td class="value">
						    <input id="propertiesName" name="propertiesName" type="text" maxlength="4000" style="width: 150px" class="inputxt"  ignore="ignore"  value='${wzDepotPage.propertiesName}'/>
							<span class="Validform_checktip"></span>
							<label class="Validform_label" style="display: none;">备注</label>
						</td>
					</tr>
					<tr>
						<td align="right">
							<label class="Validform_label">
								登记人:
							</label>
						</td>
						<td class="value">
						    <input id="creatorId" name="creatorId" type="hidden" maxlength="50" style="width: 150px" class="inputxt"  ignore="ignore"  value='${wzDepotPage.creatorId}'/>
						    <input id="creatorName" name="creatorName" type="text" maxlength="50" style="width: 150px" class="inputxt"  ignore="ignore"  value='${creatorName}'/>
							<span class="Validform_checktip"></span>
							<label class="Validform_label" style="display: none;">登记人</label>
						</td>
					</tr>
					<tr>
						<td align="right">
							<label class="Validform_label">
								登记日期:
							</label>
						</td>
						<td class="value">
									  <input id="createDate" name="createDate" type="text" style="width: 150px"  class="Wdate" onClick="WdatePicker()"  ignore="ignore" value='<fmt:formatDate value='${wzDepotPage.createDate}' type="date" pattern="yyyy-MM-dd"/>'/>
							<span class="Validform_checktip"></span>
							<label class="Validform_label" style="display: none;">登记日期</label>
						</td>
					</tr>
			</table>
		</t:formvalid>
 </body>
